# -*- coding: utf-8 -*-
# created on 2017/3/1


from mathsolver.functions.base import *


def get_mul_coeff_sym(poly, *num_sym):  # 获取乘式的系数和变量
    dt = poly.as_powers_dict()
    coeff = S.One
    sym = S.One
    for k, v in dt.items():
        if k.is_Number or k in num_sym:
            coeff *= k ** v
        else:
            sym *= k ** v
    return coeff, sym


if __name__ == '__main__':
    pass
